package com.woniu.tank.ui;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

import com.woniu.tank.tank.Tank;

public class GameFrame extends JFrame {
	public GameFrame(){
		//设置窗体大小
		this.setSize(837,795);
		//设置窗体显示,居然位置
		Dimension dm = Toolkit.getDefaultToolkit().getScreenSize();
		int width = (int)(dm.getWidth()-837)/2;
		int hight = (int)(dm.getHeight()-795)/2;
		this.setLocation(width,hight);
		this.setContentPane(new GamePanel());
		this.setVisible(true);
		//设置窗体不能动
		this.setResizable(false);
		//关闭运行
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	public static void main(String[] args) {
		new GameFrame();
		
	}

}
